home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
CRS
/
crs25.d81
/
digitize.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-10-10
|
3KB
|
125 lines
0 POKE53281,12:POKE53280,11:PRINT"[151]":IFPEEK(828)=126THEN40
1 PRINT"[147] THIS PROGRAM REQUIRES A *DATASETTE*":POKE828,126
2 PRINT"TO RECORD SOUNDS.":PRINT"BEST RESULTS ARE OBTAINED WITH VOICE "
3 PRINT"WITH [144]NO[151] BACKGROUND NOISE AT ALL."
4 PRINT"TYPED IN FROM [144]AHOY[151] MAGAZINE SEPT. 86"
6 PRINT"NOTE: THE LOWER THE PITCH, THE HIGHER THE QUALITY, THE SHORTER ";
7 PRINT"THE SOUND."
8 PRINT"EXAMPLE 'NOT FUNNY.[144]8[151].DG' IS AT PITCH 8 FOR MAXIMUM EFFECT.":GOTO11
9 PRINT"MODIFIED ON [144]BINARY CONNECTION":PRINT,"PRESS A KEY":FORK=0TO1:GETA$
10 K=-(A$<>""):NEXT:GOTO30
11 PRINT"SO PLAY IT BACK AT [144]8[151].":PRINT"ORIGINALLY BY SCOTT BAGGS":GOTO9
30 GOSUB4000
40 P=5
50 PRINT,"[147][151]DIGITIZER THING ":POKE53280,11
53 PRINT,"1 RECORD PHRASE"
54 PRINT,"2 PLAY PHRASE":PRINT,"3 LOAD DATA":PRINT,"4 SAVE DATA"
55 PRINT"CURSOR UP-DOWN PITCH:[144]"PCHR$(20)"[151](5) "CHR$(20)" "
56 GETA$:IFA$=""THEN56
57 IFA$=""THENP=(P+1)AND255
58 IFA$="[145]"THENP=ABS(P-1)
59 POKE49358,P:IFVAL(A$)>4THEN56
60 ON VAL(A$)GOSUB200,70,400,1000
65 GOTO 50
70 REM PLAY
100 SR=32:GOSUB110:POKE53280,7
102 POKE53265,PEEK(53265)AND239:
105 SYS49287:POKE53280,11
106 POKE53265,PEEK(53265)OR16
108 RETURN
110 A=49154
120 POKEA,0:POKEA+1,SR:POKEA+3,SR+128:POKEA+2,0:RETURN
200 POKE53280,5
210 PRINT"[147]RECORD - PRESS [144]PLAY[151] ON TAPE (F1 ABORTS)"
215 GETA$:IF(PEEK(1)AND16)=16ANDA$<>"[133]"THEN215
216 IFA$="[133]"THEN50
220 SR=32:GOSUB110
230 SYS49200:POKE53280,11
235 POKE192,32:POKE1,55
240 RETURN
400 PRINT"[147]LOAD DATA [151]":POKE53280,6
420 FL$="":INPUT"FILENAME TO LOAD";FL$:IFFL$=""THEN50
430 LOADFL$,8,1
480 RETURN
1000 PRINT"[147]SAVE SPEECH DATA [151]":POKE53280,2
1005 F$="":INPUT"NAME TO SAVE UNDER";F$:IFF$=""THEN40
1015 REM LOC.
1020 POKE187,PEEK(71):POKE188,PEEK(72)
1025 REM CSLC POINT TO F$
1030 FA=PEEK(187)+256*PEEK(188)
1035 REM LEN
1040 POKE183,PEEK(FA)
1055 REM FN POINTER
1060 POKE187,PEEK(FA+1):POKE188,PEEK(FA+2)
1070 REM
1080 SA$="2000"
1090 N$=SA$:GOSUB2000:SL=BL:SH=BH
1095 REM
1100 EA$="A000"
1110 N$=EA$:GOSUB2000:EL=BL:EH=BH
1115 REM
1120 POKE251,SL:POKE252,SH
1125 REM
1130 POKE186,8:POKE185,1
1140 POKE780,251:POKE781,EL:POKE782,EH
1150 SYS65496: REM SAVE
1160 RETURN
1999 REM WHAT A DUMB PLACE FOR A REM
2000 REM HEX => DECIMAL
2020 N=0
2030 FORI=1TOLEN(N$)
2040 X=ASC(MID$(N$,I))-48
2050 N=16*N+X+7*(X>9)
2060 NEXT
2100 BH=INT(N/256):BL=N-256*BH
2110 RETURN
4000 FORI=49152TO49371
4010 READQ
4020 POKEI,Q
4030 NEXT I
4040 RETURN
5000 DATA 0,255,00,64,0
5010 DATA 88,5,255,00,255
5020 DATA 0,255,0,0,0
5030 DATA 255,0,1,2,4
5040 DATA 8,16,32,64,128
5050 DATA 255,0,255,0,255
5060 DATA 0,255,0,254,253
5070 DATA 251,247,239,223,191
5080 DATA 127,255,187,255,3
5090 DATA 255,32,255,173,17
5100 DATA 208,41,239,141,17
5110 DATA 208,120,32,192,192
5120 DATA 173,13,220,240,251
5130 DATA 162,16,173,13,220
5140 DATA 208,6,202,240,241
5150 DATA 76,67,192,162,8
5160 DATA 32,205,192,173,13
5170 DATA 220,41,16,240,10
5180 DATA 177,2,29,16,192
5190 DATA 145,2,76,110,192
5200 DATA 177,2,61,32,192
5210 DATA 145,2,76,110,192
5220 DATA 202,208,223,200,208
5230 DATA 218,230,3,165,3
5240 DATA 205,5,192,208,209
5250 DATA 88,173,17,208,9
5260 DATA 16,141,17,208,96
5270 DATA 120,32,192,192,162
5280 DATA 8,32,205,192,177
5290 DATA 2,61,16,192,240
5300 DATA 12,169,15,141,24
5310 DATA 212,76,159,192,234
5320 DATA 76,175,192,169,0
5330 DATA 141,24,212,76,171
5340 DATA 192,234,76,175,192
5350 DATA 202,208,219,200,208
5360 DATA 214,230,3,165,3
5370 DATA 205,5,192,208,205
5380 DATA 88,96,173,2,192
5390 DATA 133,2,173,3,192
5400 DATA 133,3,160,0,96
5410 DATA 169,5,141,0,192
5420 DATA 206,0,192,173,0
5430 DATA 192,208,248,96,255